﻿@{
    Layout = null;
    List<EnterpriseFund.Model.FinanceProp> financePropList = (ViewData["FinancePropList"] == null ? new List<EnterpriseFund.Model.FinanceProp>() : ViewData["FinancePropList"] as List<EnterpriseFund.Model.FinanceProp>);
}
@model System.Data.DataTable

<!DOCTYPE html>
<html>
<head>
    <title>已受理企业查询</title>
  @if (false)
  {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
  }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )

    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            var NSRMC = $("#hNSRMC").val();
            var FFinance = $("#hFFinance").val();
            var NSRBM = $("#hNSRBM").val();
            var NSRSBH = $("#hNSRSBH").val();
            // var FNewEnterprise = $("#hFNewEnterprise").val();
            //   var FIssueID = $("#hFIssueID").val();
            var ISPAY = $("#hISPAY").val();
            var FYear = $("#hFYear").val();
            //            var BTJEA = $("#hBTJEA").val();
            //            var BTJEB = $("#hBTJEB").val();
            //            var FApplyDate = $("#hFApplyDate").val();
            //            var LastPayDate = $("#hLastPayDate").val();
            //            var ISBASE = $("#hISBASE").val();
            //            var FFileNo = $("#hFFileNo").val();
            var SKSJA = $("#hSKSJA").val();
            var SKSJB = $("#hSKSJB").val();

            //            var FNote = $("#hFNote").val();
            //            var FPayDateBegin = $("#hFPayDateBegin").val();
            //            var FPayDateEnd = $("#hFPayDateEnd").val();

            e.customArgs["NSRMC"] = NSRMC;
            e.customArgs["FFinance"] = FFinance;
            e.customArgs["NSRBM"] = NSRBM;
            e.customArgs["NSRSBH"] = NSRSBH;
            // e.customArgs["FNewEnterprise"] = FNewEnterprise;
            //  e.customArgs["FIssueID"] = FIssueID;
            e.customArgs["ISPAY"] = ISPAY;
            e.customArgs["FYear"] = FYear;
            //            e.customArgs["BTJEA"] = BTJEA;
            //            e.customArgs["BTJEB"] = BTJEB;
            //            e.customArgs["FApplyDate"] = FApplyDate;
            //            e.customArgs["LastPayDate"] = LastPayDate;
            //            e.customArgs["ISBASE"] = ISBASE;
            //            e.customArgs["FFileNo"] = FFileNo;
            if (SKSJA != null&&SKSJA!="") {
                e.customArgs["SKSJA"] = parseInt(SKSJA) * 10000;
            }
            if (SKSJB != null && SKSJB!="") {
                e.customArgs["SKSJB"] = parseInt(SKSJB) * 10000;
            } 
        }


        //查询
        function search() {
            $("#hNSRMC").val(NSRMC1.GetText());
            $("#hFFinance").val(FFinance1.GetValue());
            $("#hNSRBM").val(NSRBM1.GetText());
            $("#hNSRSBH").val(NSRSBH1.GetText());
          //  $("#hFNewEnterprise").val(FNewEnterprise1.GetValue());
          //  $("#hFIssueID").val(FIssueID1.GetText());
            $("#hISPAY").val(ISPAY1.GetChecked());
            $("#hFYear").val(FYear1.GetText());

         //   $("#hBTJEA").val(BTJEA1.GetText());



//               $("#hBTJEB").val(BTJEB1.GetText());

//            if (FApplyDate1.GetDate() != null) {
//                $("#hFApplyDate").val(FApplyDate1.GetText());
//            }
//            if (LastPayDate1.GetDate() != null) {
//                $("#hLastPayDate").val(LastPayDate1.GetText());
//            }

//            $("#hISBASE").val(ISBASE1.GetChecked());
//            $("#hFFileNo").val(FFileNo1.GetText());
            $("#hSKSJA").val(SKSJA1.GetText());
            $("#hSKSJB").val(SKSJB1.GetText());



            gvEditing.Refresh();
        }


        
        //重置
        function undo() {
//            NSRMC.SetText("");
//            NSRBM.SetText("");
//            NSRSBH.SetText("");
            //            FYear.SetText("");
            ISPAY1.SetChecked(false);
            FFinance1.SetValue("");
         //   FNewEnterprise1.SetValue("");
            //            FAmount1.SetText("");
            //            FAmount2.SetText("");
            //            FFileNo1.SetText("");
            //            FNote1.SetText("");
            //            FPayDateBegin1.SetText("");
            //            FPayDateEnd1.SetText("");

            form_query.reset();
        }

       
           
        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {

                        //if (CheckValues())
                        form_query.target = '_self';
                        form_query.action = rootPath + "/QueryAccept/ExportToXls";
                        form_query.submit();
                        break;


                    }
                case "btnReport":
                    {

                        //if (CheckValues())
                        form_query.target = '_blank';
                        //  form_query.target = 'parent.contentframe';
                        //  parent.contentframe.url(
                        form_query.action = rootPath + "/QueryAccept/Print";
                        form_query.submit();
                        break;


                    }
            }
        }
    </script>
</head>
<body>
    @using (Html.BeginForm("ExportToXls", "QueryAccept", FormMethod.Post, new { id = "form_query" }))
    {
            @Html.DevExpress().Menu(settings =>
       {
           settings.Name = "toolBarMenu";
           settings.ItemAutoWidth = false;
           settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
           settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
           settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
           settings.Items.Add(item =>
           {
               item.Name = "btnExcel";
               item.Text = "导出Excel";
               item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
           });
           settings.Items.Add(item =>
           {
               item.Name = "btnReport";
               item.Text = "打印";
               item.Image.Url = Url.Content("~/Content/icons/print.png");
           });
           
           settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
           settings.ItemLinkMode = ItemLinkMode.ContentBounds;
       }).GetHtml()
        
    <table class="query"  width="800px" style="margin-left: auto; margin-right: auto" >
        <tr>
        <td align="right" style="text-align:right">
                纳税人名称:
            </td>
             <td>
          
                 @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "NSRMC1";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
            }).Bind(ViewBag.nsrmc).GetHtml()
 
            </td>
            <td align="right" style="text-align:right">
              纳税人编码:
            </td>
            <td>
              <table>
                <tr>
                <td>
                 @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "NSRBM1";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
            }).Bind(ViewBag.NSRBM).GetHtml()
             </td></tr></table> 
            </td>
            
            <td align="right" style="text-align:right">
                纳税人识别号:
            </td>
            <td>
              <table>
                <tr>
                <td>
           @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRSBH1";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
      }).Bind(ViewBag.NSRSBH1).GetHtml()
       </td></tr></table> 
            </td>



            

           
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnSearch";
               settings.Text = "查询";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
               settings.ClientSideEvents.Click = "search";
           }).GetHtml()
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnUndo";
               settings.Text = "重置";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
               settings.ClientSideEvents.Click = "undo";
           }).GetHtml()
            </td>
        </tr>
        <tr>
                    
                        <td align="right" style="text-align:right">
                补贴年度:
            </td>
            <td>
           @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "FYear1";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
      }).Bind(ViewData["year"]).GetHtml()

            </td>
            <td align="right" style="text-align:right">
                    经济类型:
                </td>
                <td>
                 
           <table>
                <tr>
                <td>
                @Html.DevExpress().ComboBox(settings =>
           {
               settings.Name = "FFinance1";
               settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               settings.Properties.TextField = "FFinancePropShortName";
               settings.Properties.ValueField = "FFinancePropNo";
               settings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
               settings.Properties.DropDownStyle = DropDownStyle.DropDown;
               //settings.Properties.ClientSideEvents.SelectedIndexChanged = "Changed";

           }).BindList(ViewData["FinancePropList"]).Bind(ViewBag.FFinance).GetHtml()
              </td></tr></table> 
               </td>
               <td  align="right" style="text-align:right">
                    税款金额:万元
                    </td>
                <td >
                <table>
                <tr>
                <td>
                 @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "SKSJA1";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(69);
            }).Bind(ViewData["se"]).GetHtml()
                </td>
                    <td> - </td>
                    <td>
                               @Html.DevExpress().TextBox(settings =>
                          {
                              settings.Name = "SKSJB1";
                              settings.Width = System.Web.UI.WebControls.Unit.Pixel(69);
                          }).Bind(ViewBag.SKSJB).GetHtml()
                </td>
                </tr>
                </table>
               </td>
                 <td colspan="2">
                   @Html.DevExpress().CheckBox(settings =>
              {
                  settings.Name = "ISPAY1";
                  settings.Text = "已受理企业";
                  // settingsCheckBox.Properties.ClientSideEvents.CheckedChanged = string.Format("function(s, e) {{ if(s.GetChecked()) {0}.SelectAllRowsOnPage(); else {0}.UnselectAllRowsOnPage(); }}", settings.Name);


                  //      settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                  //settings.Properties.ValidationSettings.EnableCustomValidation = true;

              }).GetHtml() 
            
                </td>
                @*<td colspan="1">
               
                       </td>   *@   
</tr>
<tr> <td colspan="3"> <p style="color: #FF0000; white-space: nowrap; line-height: normal; text-indent: 18px;" > 年度为空时默认年度为 @ViewBag.dyear 年</p></td></tr>
    </table>
    @Html.Partial("QueryAcceptListPartial", Model)
    

       @Html.Hidden("hNSRMC", "");
       @Html.Hidden("hFFinance", "");
        @Html.Hidden("hNSRBM", "");
         @Html.Hidden("hNSRSBH", "");
                              @Html.Hidden("hFNewEnterprise", "");
       @Html.Hidden("hFIssueID", "");
        @Html.Hidden("hISPAY", "");
         @Html.Hidden("hFYear", "");
          @Html.Hidden("hBTJEA", "");
       @Html.Hidden("hBTJEB", "");
        @Html.Hidden("hFApplyDate", "");
         @Html.Hidden("hLastPayDate", "");
          @Html.Hidden("hISBASE", "");
       @Html.Hidden("hFFileNo", "");
        @Html.Hidden("hSKSJA", ViewData["se"]);
         @Html.Hidden("hSKSJB", "");
    }
</body>
</html>

